package com.ruoyi.payMent.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.payMent.mapper.FeesinfoMapper;
import com.ruoyi.payMent.domain.Feesinfo;
import com.ruoyi.payMent.service.IFeesinfoService;

/**
 * 支付记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-24
 */
@Service
public class FeesinfoServiceImpl implements IFeesinfoService 
{
    @Autowired
    private FeesinfoMapper feesinfoMapper;

    /**
     * 查询支付记录
     * 
     * @param payId 支付记录主键
     * @return 支付记录
     */
    @Override
    public Feesinfo selectFeesinfoByPayId(Long payId)
    {
        return feesinfoMapper.selectFeesinfoByPayId(payId);
    }

    /**
     * 查询支付记录列表
     * 
     * @param feesinfo 支付记录
     * @return 支付记录
     */
    @Override
    public List<Feesinfo> selectFeesinfoList(Feesinfo feesinfo)
    {
        return feesinfoMapper.selectFeesinfoList(feesinfo);
    }

    /**
     * 新增支付记录
     * 
     * @param feesinfo 支付记录
     * @return 结果
     */
    @Override
    public int insertFeesinfo(Feesinfo feesinfo)
    {
        feesinfo.setCreateTime(DateUtils.getNowDate());
        return feesinfoMapper.insertFeesinfo(feesinfo);
    }

    /**
     * 修改支付记录
     * 
     * @param feesinfo 支付记录
     * @return 结果
     */
    @Override
    public int updateFeesinfo(Feesinfo feesinfo)
    {
        feesinfo.setUpdateTime(DateUtils.getNowDate());
        return feesinfoMapper.updateFeesinfo(feesinfo);
    }

    /**
     * 批量删除支付记录
     * 
     * @param payIds 需要删除的支付记录主键
     * @return 结果
     */
    @Override
    public int deleteFeesinfoByPayIds(Long[] payIds)
    {
        return feesinfoMapper.deleteFeesinfoByPayIds(payIds);
    }

    /**
     * 删除支付记录信息
     * 
     * @param payId 支付记录主键
     * @return 结果
     */
    @Override
    public int deleteFeesinfoByPayId(Long payId)
    {
        return feesinfoMapper.deleteFeesinfoByPayId(payId);
    }


}
